#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <random>
#include <QTimer>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

public slots:
    void startEvaluation();
    void updateEvaluation();

private:
    Ui::Widget *ui;

    int evaluationTime;
    QTimer *evaluationTimer;

    int targetAttack;
    int targetProtect;
    int targetOriginal;

    int currentAttack;
    int currentProtect;
    int currentOriginal;

    // 随机数生成器
    std::mt19937 gen;
    std::uniform_int_distribution<> dis;

    QString getPlayerGrade(int attack, int protect, int original);
    void setupHallOfFamePlayers(const QString &playerName);

};
#endif // WIDGET_H
